package cn.iocoder.yudao.framework.business.eligibility.service;

import cn.iocoder.yudao.framework.business.basic.service.MemberExtensionService;
import cn.iocoder.yudao.framework.business.eligibility.pojo.po.EligibilityOrderEntity;
import cn.iocoder.yudao.framework.business.eligibility.pojo.po.EligibilityUserEntity;

/**
 * 用户身份资格 Service 实现类
 *
 * @author 山野羡民
 */
public interface AppEligibilityService<DO extends EligibilityUserEntity, ODO extends EligibilityOrderEntity> extends MemberExtensionService<DO> {

    /**
     * 订单支付成功后更新用户身份资格
     *
     * @param order 订单信息
     */
    void updateWhenPaid(ODO order);

    /**
     * 校验用户身份资格是否有效
     *
     * @param userId 用户编号
     * @return 用户身份资格信息
     */
    boolean isValid(Long userId);

}